<?php
class Item_image_model extends MY_Model {
	

	var $filename = null;
	var $original = null;
	var $thumbnail = null;
	var $item_id = null;
	
	function __construct() {
		parent::__construct(); 
	}
	
	function getByItemId($id) {
		$entry = $this->db->query("SELECT * FROM ".$this->table()." WHERE item_id = $id AND valid = 1"); 
 	  	return $entry->result();
	}
}
?>